/**
 * 个人登录记录
 *
 * @date 2020-09-13
 * @author 逗号米
 */

import * as http from '@/http'
import * as api from '@/api/cms/personal/personal-login-record'

/**
 * 首页
 *
 * @params {Object} [params] 参数
 * @return {Promise<any>}
 */
export const index = (params?: any): Promise<any> => http.get(api.index, params)

/**
 * 查询
 *
 * @params {Object} [params] 参数
 * @return {Promise<any>}
 */
export const query = (params?: any): Promise<any> => http.get(api.query, params)

/**
 * 显示
 *
 * @params {int} id 主键
 * @params {Object} [params] 参数
 * @return {Promise<any>}
 */
export const show = (id: number, params?: any): Promise<any> => http.get(api.show(id), params)

/**
 * 删除
 *
 * @params {int} id 主键
 * @params {Object} [params] 参数
 * @return {Promise<any>}
 */
export const destroy = (id: number, params?: any): Promise<any> => http.del(api.destroy(id), params)

/**
 * 按用户查询记录
 *
 * @params {int} uid 主键
 * @params {Object} [params] 参数
 * @return {Promise<any>}
 */
export const user = (uid: number, params?: any): Promise<any> => http.get(api.user(uid), params)